package com.slz3.business.module.systemManagement.sysRolePermissions.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.systemManagement.sysRolePermissions.domain.SysRolePermissions;
import com.slz3.business.module.systemManagement.sysRolePermissions.domain.SysRolePermissionsCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class SysRolePermissionsResAtomic extends SysRolePermissionsResExecutor {

    public Mono<ServerResponse> add_$SysRolePermissionsUpdateLock(ServerRequest req, SysRolePermissions sysRolePermissions) {
        return SysRolePermissionsResSafeValid.add(req, sysRolePermissions) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, sysRolePermissions);
    }

    public Mono<ServerResponse> delete_$SysRolePermissionsUpdateLock(ServerRequest req, SysRolePermissionsCondition sysRolePermissionsCondition) {
        return SysRolePermissionsResSafeValid.delete(req, sysRolePermissionsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$SysRolePermissionsUpdateLock(ServerRequest req, SysRolePermissions sysRolePermissions) {
        return SysRolePermissionsResSafeValid.modify(req, sysRolePermissions) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, sysRolePermissions);
    }

    public Mono<ServerResponse> info_$SysRolePermissionsUpdateLock(ServerRequest req) {
        return SysRolePermissionsResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$SysRolePermissionsUpdateLock(ServerRequest req, SysRolePermissionsCondition sysRolePermissionsCondition) {
        return SysRolePermissionsResSafeValid.auditSubmit(req, sysRolePermissionsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$SysRolePermissionsUpdateLock(ServerRequest req, SysRolePermissionsCondition sysRolePermissionsCondition) {
        return SysRolePermissionsResSafeValid.audit(req, sysRolePermissionsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$SysRolePermissionsUpdateLock(ServerRequest req, SysRolePermissionsCondition sysRolePermissionsCondition) {
        return SysRolePermissionsResSafeValid.auditReject(req, sysRolePermissionsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$SysRolePermissionsUpdateLock(ServerRequest req, SysRolePermissionsCondition sysRolePermissionsCondition) {
        return SysRolePermissionsResSafeValid.usingEnable(req, sysRolePermissionsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$SysRolePermissionsUpdateLock(ServerRequest req, SysRolePermissionsCondition sysRolePermissionsCondition) {
        return SysRolePermissionsResSafeValid.usingDisable(req, sysRolePermissionsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
